package com.leostadyn.stackfarm.timestatistics.model.bean;

import android.os.Parcel;
import android.os.Parcelable;

public class DetailProjectBean implements Parcelable, Comparable<DetailProjectBean> {
    public static final Creator<DetailProjectBean> CREATOR = new Creator<DetailProjectBean>() {
        @Override
        public DetailProjectBean createFromParcel(Parcel in) {
            return new DetailProjectBean(in);
        }

        @Override
        public DetailProjectBean[] newArray(int size) {
            return new DetailProjectBean[size];
        }
    };
    /**
     * projectName : 工时统计系统
     * projectCode : 001
     * projectWorkingHours : 0.7
     */

    private String projectName;
    private String projectCode;
    private double projectWorkingHours;
    private String projectId;

    protected DetailProjectBean(Parcel in) {
        projectName = in.readString();
        projectCode = in.readString();
        projectWorkingHours = in.readDouble();
        projectId = in.readString();

    }


    public String getProjectId() {
        return projectId;
    }

    public void setProjectId(String projectId) {
        this.projectId = projectId;
    }

    public String getProjectName() {
        return projectName;
    }

    public void setProjectName(String projectName) {
        this.projectName = projectName;
    }

    public String getProjectCode() {
        return projectCode;
    }

    public void setProjectCode(String projectCode) {
        this.projectCode = projectCode;
    }

    public double getProjectWorkingHours() {
        return projectWorkingHours;
    }

    public void setProjectWorkingHours(double projectWorkingHours) {
        this.projectWorkingHours = projectWorkingHours;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(projectName);
        dest.writeString(projectCode);
        dest.writeDouble(projectWorkingHours);
        dest.writeString(projectId);

    }

    @Override
    public int compareTo(DetailProjectBean o) {
        return this.projectCode.compareTo(o.projectCode);
    }
}
